package com.wondertek.mist.plugins;

import org.apache.cordova.api.CallbackContext;
import org.apache.cordova.api.CordovaPlugin;
import org.apache.cordova.api.PluginResult;
import org.json.JSONArray;
import org.json.JSONException;

import com.wondertek.mist.utils.LocalManagerUtils;

public class CurrentPositionPlugin extends CordovaPlugin{

	@Override
    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
		if("getCurrentPositon".equalsIgnoreCase(action)){
			callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK,LocalManagerUtils.getCurrentPosition()));
		}
		return true;
	}

}
